﻿using Newtonsoft.Json;
using System.Collections.Generic;
namespace ProjectModel
{
    public class ParameterModel
    {
        /// <summary>
        /// 操作类型
        /// </summary>
        [JsonProperty(PropertyName = "optiontype")]
        public int OptionType { get; set; }

        /// <summary>
        /// 当前页码
        /// </summary>
        [JsonProperty(PropertyName = "pageindex")]
        public int pageIndex { get; set; }

        /// <summary>
        /// 每页条数
        /// </summary>
        [JsonProperty(PropertyName = "pagesize")]
        public int pageSize { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        [JsonProperty(PropertyName = "sortfield")]
        public string sortField { get; set; }

        /****
         * 例如 
         * name='张三' 对应 name:0张三
         * name=!'张三' 对应 name:1张三
         * name='张三' or name='李四' 对应 name:2张三,李四
         * name like '%张%' 对应 name:3张
         * time>'2021 01 01'对应 time:>2021 01 01
         * time<'2021 01 01'对应 time:<2021 01 01
         * 2021 01 01<time< 2021 02 02 对应 tiem:T2021 01 01,2021 02 02
         *
         * 
         * ***/
        /// <summary>
        /// 条件查询集合 
        /// name:张三;
        /// name:!,张三
        /// name:or,张三
        /// tiem:T,2021-01-12;2021-01-14 检索时间字段从2021-01-12 到 2021-01-14
        /// </summary>
        [JsonProperty(PropertyName = "wheredata")]
        public List<string> whereData { get; set; }
    }
}
